package com.frank.oj.service.entity.discussion.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.frank.model.entity.discussion.DiscussionReport;
import com.frank.oj.common.result.CommonResult;
import com.frank.oj.mapper.DiscussionReportMapper;
import com.frank.oj.model.vo.DiscussionReportVO;
import com.frank.oj.service.entity.discussion.DiscussionReportEntityService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author frank
 * @Date 2024/4/7
 */
@Service
public class DiscussionReportEntityServiceImpl extends ServiceImpl<DiscussionReportMapper, DiscussionReport> implements DiscussionReportEntityService {

    @Resource
    private DiscussionReportMapper discussionReportMapper;

    @Override
    public IPage<DiscussionReportVO> getDiscussionReportList(Integer currentPage, Integer limit) {

        Page<DiscussionReportVO> page = new Page<>(currentPage,limit);
        return discussionReportMapper.getDiscussionReportList(page);
    }
}
